158 research outputs found

    Strongly typed heterogeneous collections

    Get PDF
    A heterogeneous collection is a datatype that is capable of storing data of different types, while providing operations for look-up, update, iteration, and others. There are various kinds of heterogeneous collections, differing in representation, invariants, and access operations. We describe HList --- a Haskell library for strongly typed heterogeneous collections including extensible records. We illustrate HList's benefits in the context of type-safe database access in Haskell. The HList library relies on common extensions of Haskell 98. Our exploration raises interesting issues regarding Haskell's type system, in particular, avoidance of overlapping instances, and reification of type equality and type unificatio

    Stream Fusion, to Completeness

    Full text link
    Stream processing is mainstream (again): Widely-used stream libraries are now available for virtually all modern OO and functional languages, from Java to C# to Scala to OCaml to Haskell. Yet expressivity and performance are still lacking. For instance, the popular, well-optimized Java 8 streams do not support the zip operator and are still an order of magnitude slower than hand-written loops. We present the first approach that represents the full generality of stream processing and eliminates overheads, via the use of staging. It is based on an unusually rich semantic model of stream interaction. We support any combination of zipping, nesting (or flat-mapping), sub-ranging, filtering, mapping-of finite or infinite streams. Our model captures idiosyncrasies that a programmer uses in optimizing stream pipelines, such as rate differences and the choice of a "for" vs. "while" loops. Our approach delivers hand-written-like code, but automatically. It explicitly avoids the reliance on black-box optimizers and sufficiently-smart compilers, offering highest, guaranteed and portable performance. Our approach relies on high-level concepts that are then readily mapped into an implementation. Accordingly, we have two distinct implementations: an OCaml stream library, staged via MetaOCaml, and a Scala library for the JVM, staged via LMS. In both cases, we derive libraries richer and simultaneously many tens of times faster than past work. We greatly exceed in performance the standard stream libraries available in Java, Scala and OCaml, including the well-optimized Java 8 streams

    Basic Robotecnical Platform for Implementation of Accurate Farming Technologies

    Get PDF
    Improvement of modern technical systems and technologies. Increasing the productivity of modern agricultural machines with increasing their weight, which leads, in the course of their work, to a significant compaction of the soil. The heterogeneity of the soil, as a bearing surface, causes not adjustable fluctuations in the workplace, which makes automation of the application of robotics more difficult. Modern solutions to the problems of reducing the negative impact on the soil, increasing the permeability of aggregates due to the reconstruction of the propulsors do not give the proper effect. More cardinally solve these problems, as well as the ability to implement automation and robotics bridge systems such as ABAC, moving along rail tracks, AASP on vertical piles and point gravel-halide supports with concrete platforms. The most promising of these is the AAS platform, which is a 30x10 m bridge structure that moves by step-by-step extension, the beams onto 3 subsequent pads located 10 m away. After entering the new position of the bridge platform, along the long 30-meter span beams Moves the work-technological module with a set of working elements, performing the programmed operations. Thus, in the AASP bridge system under consideration, the soil area subjected to compaction at reference points is just over 1% of the 70% protraction of modern machines. Compared to the ABAC system, moving along railways, the equipment of point supports is much less expensive and requires insignificant operating costs. At the same time, the rigidity of AASP design ensures stable operation of technological mechanisms in a programmed robotic mode with a minimum of unproductive energy costs associated with movement

    Structured Traversal of Search Trees in Constraint-logic Object-oriented Programming

    Full text link
    In this paper, we propose an explicit, non-strict representation of search trees in constraint-logic object-oriented programming. Our search tree representation includes both the non-deterministic and deterministic behaviour during execution of an application. Introducing such a representation facilitates the use of various search strategies. In order to demonstrate the applicability of our approach, we incorporate explicit search trees into the virtual machine of the constraint-logic object-oriented programming language Muli. We then exemplarily implement three search algorithms that traverse the search tree on-demand: depth-first search, breadth-first search, and iterative deepening depth-first search. In particular, the last two strategies allow for a complete search, which is novel in constraint-logic object-oriented programming and highlights our main contribution. Finally, we compare the implemented strategies using several benchmarks.Comment: Part of DECLARE 19 proceeding

    Strongly typed heterogeneous collections

    Get PDF
    A heterogeneous collection is a datatype that is capable of storing data of different types, while providing operations for look-up, update, iteration, and others. There are various kinds of heterogeneous collections, differing in representation, invariants, and access operations. We describe HList --- a Haskell library for strongly typed heterogeneous collections including extensible records. We illustrate HList's benefits in the context of type-safe database access in Haskell. The HList library relies on common extensions of Haskell 98. Our exploration raises interesting issues regarding Haskell's type system, in particular, avoidance of overlapping instances, and reification of type equality and type unificatio

    The constrained-monad problem

    Get PDF
    In Haskell, there are many data types that would form monads were it not for the presence of type-class constraints on the operations onthat data type. This is a frustrating problem in practice, because there is a considerable amount of support and infrastructure for monads that these data types cannot use. Using several examples,we show that a monadic computation can be restructured into a normal form such that the standard monad class can be used. The technique is not specific to monads, and we show how it can also be applied to other structures, such as applicative functors. One significant use case for this technique is domain-specific languages,where it is often desirable to compile a deep embedding of a computation to some other language, which requires restricting the types that can appear in that computation

    ЗАХВОРЮВАНІСТЬ НА ГОСТРИЙ ВІРУСНИЙ ГЕПАТИТ С У ДНІПРОПЕТРОВСЬКОМУ РЕГІОНІ ТА УКРАЇНІ

    Get PDF
    Purpose: to study and analyze the incidence of acute viral hepatitis C in the years 2001–2017 in the Dnipropetrovsk region in comparison with the indicators in Ukraine, and to determine the trends and rates of growth.Materials and Methods. The morbidity analysis was conducted using the epidemiological method. Trends in the incidence calculated in terms of growth and increase.Results. The dynamics of the incidence of acute viral hepatitis C in Ukraine and in the Dnipropetrovsk region as a whole and in separate territories in the period from 2004 to 2017 was wavy, with a more pronounced tendency to lower rates in Ukraine. The average incidence rate in the region was (2.04±0.11) per 100.000 population (95 % CI 1.81–2.27), the average rate of growth was (98.48±4.70) % versus (1.72±0.12) per 100 thousand population in Ukraine (p <0.05), average growth rate – (95.18±3.25) %. The high incidence of acute viral hepatitis C in the cities of the oblast was noted (2.30±0.13) per 100 thousand), which in 1.34 times exceeded its level in the city of Dnipro (p <0.01) and in 1.55 times – the corresponding indicator in rural areas (p <0.001).Conclusions. The incidence of acute viral hepatitis C in the Dnipropetrovsk region and in Ukraine tends to decrease. To implement a global WHO strategy for viral hepatitis, a comprehensive screening program is needed to plan effective prevention and anti-epidemic measures.Мета: вивчити та проаналізувати рівень захворюваності на гострий вірусний гепатит С (ВГС) у багаторічній динаміці за 2001–2017 рp. у Дніпропетровському регіоні, порівняно з показниками в Україні, та визначити тенденції й темпи приросту.Матеріали і методи. Аналіз захворюваності проведено епідеміологічним методом. Тенденції захворюваності розраховували за темпами зростання та приросту.Результати. Динаміка захворюваності на ВГС в Україні та в Дніпропетровському регіоні в цілому і на окремих територіях у період із 2004 до 2017 р. мала хвилеподібний характер з більш вираженою тенденцією до зниження показників в Україні. Середній показник захворюваності в області становив 2,04±0,11 на 100 тис. населення (95 % ДІ 1,81–2,27), середній темп зростання – (98,48±4,70) %. Показник захворюваності в Україні – 1,72±0,12 на 100 тис. населення (p<0,05), середній темп зростання – (95,18±3,25) %. Відзначено високий рівень захворюваності на ВГС у містах області (2,30±0,13 на 100 тис. населення), який в 1,34 разу перевищував її рівень у м. Дніпрі (p<0,01) та в 1,55 разу – відповідний показник у сільських районах (p<0,001).Висновки. Захворюваність на гострий вірусний гепатит С у Дніпропетровській області та в Україні має тенденцію до зниження. Для впровадження глобальної стратегії ВООЗ із вірусних гепатитів необхідно провести широку скринінгову програму при плануванні ефективних профілактичних та протиепідемічних заходів

    COMPARISON OF ACE INHIBITOR (FOSINOPRIL) AND Β-ADRENOBLOCKER (ATENOLOL) EFFECTS ON AUTONOMIC REGULATION OF THE HEART IN PATIENTS WITH ARTERIAL HYPERTENSION

    Get PDF
    Aim. To estimate effects of fosinopril and atenolol on autonomic regulation of heart in patients with arterial hypertension (HT) on the basis of spectral characteristics of heart rate variability (HRV).Material and methods. 49 patients (46±7 y.o.) with untreated or inadequately treated HT without end organ damages and associated clinical conditions were involved in the study. Heart rhythm was registered during passive orthostatic test with spontaneous breath within 10 min for each stage of the test. HRV was estimated by parametrical method based on autoregression model. Frequency power of HRV spectrum (ms2 ) in high-frequency (HF: 0,15-0,4 Hz) and low-frequency (LF: 0,04-0,15 Hz) ranges was calculated as well as the total power of a spectrum (ТР).Results. Fosinopril and atenolol reduced in blood pressure levels similarly, atenolol as well reduced in heart rate. Fosinopril and atenolol changed power of LF-range in comparable decreasing manner in upright position. Fosinopril therapy resulted in the same changes with power of HF-range. Atenolol increased power of HF-range in horizontal position and had no effect in upright position. There were not dynamic in TP during treatments.Conclusion. Fosinopril and atenolol have similar effects on the central mechanisms of autonomic heart regulation and HRV, though atenolol effect on sympathetic-parasympathetic balance is more prominent
    corecore